# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libmnl
pkgver=1.0.4
pkgrel=1
pkgdesc="Library for minimalistic netlink"
url="http://www.netfilter.org/projects/libmnl/"
arch="all"
license="GPL"
depends_dev="linux-headers"
makedepends="$depends_dev bsd-compat-headers"
subpackages="$pkgname-static $pkgname-dev"
source="https://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
	musl-fix-headers.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-static
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e2bbfb688fe41913d53c74ba7ec95b4e88ee2c52b556b8608185f2fcbd629665423a3b37f877f84426ba257cf6040fa701539d67166b00b8e3e2dfde6831a2f9  libmnl-1.0.4.tar.bz2
984307f6a40bdd1231cf97ac84719eefaf436544bcad3a52f8590ab73676ac3064f44af65b57dfb7920aa3c84a44977e385410faf354a0a64efc5364b4314496  musl-fix-headers.patch"
